package com.changan.stumgr.service;

import com.changan.stumgr.mapper.StudentMapper;
import com.changan.stumgr.pojo.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentMapper studentMapper;

    @Override
    public List<Student> selAllStudent(Student student) {
        return studentMapper.selAllStudent(student);
    }

    @Override
    public int addStudent(Student student) {
        return studentMapper.addStudent(student);
    }

    @Override
    public int delStudent(Integer id) {
        return studentMapper.delStudent(id);
    }

    @Override
    public int updateStudent(Student student) {
        return studentMapper.updateStudent(student);
    }

    @Override
    public List<Student> findStudentById(Integer id) {
        return studentMapper.findStudentById(id);
    }
}
